fix(desktop): 同步 JCEF 首次原生尺寸 - #20
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
修复 Compose Desktop 中 JCEF windowed 视图首帧可能黑屏、必须手动调整窗口尺寸后才显示的问题。
改动内容
setBounds()。平台影响
验证命令与结果
./gradlew --no-configuration-cache :webview-desktop:test --tests io.github.multiweb.desktop.DesktopInitialNativeViewLayoutCoordinatorTest --console=plain:通过。./gradlew --no-configuration-cache :webview-desktop:test :webview-compose:jvmTest :sample-compose:compileKotlinDesktop --console=plain:通过。./gradlew --no-configuration-cache apiCheck --console=plain:未完成;环境未安装 Xcode,webview-ios:cinteropMultiWebFileChooserIosArm64因xcrun xcodebuild -version失败退出。Desktop 受影响模块测试与编译均已通过。风险与兼容性
低风险。改动只作用于 Desktop 内部首次原生布局流程,不改变浏览器创建、销毁、导航、JS 桥或安全配置;重复使用现有边界,不会改变 Compose 布局尺寸或位置。
文档变更
更新了内部 KDoc,说明为何浏览器就绪后必须重新同步当前边界;无需修改公开接入文档。